package edu.cs.usask.ca.silver.plugin.rcp.views.visualization;

import java.awt.BorderLayout;
import java.awt.Frame;

import org.eclipse.swt.SWT;
import org.eclipse.swt.awt.SWT_AWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.part.ViewPart;

import edu.cs.usask.ca.silver.plugin.visualization.VisualWorkspace;



public class VisualWorkspaceView extends ViewPart {
	public static final String ID = "edu.cs.usask.ca.silver.plugin.rcp.visualworkspace";
	public VisualWorkspaceView() {
		// TODO Auto-generated constructor stub
		super();
		setPartName("test");
		setContentDescription("Silver | Visual Workspace");
	}
	

	@Override
	public void createPartControl(Composite parent) {
	    Composite composite = new Composite(parent, SWT.EMBEDDED | SWT.NO_BACKGROUND);
	    Frame frame = SWT_AWT.new_Frame(composite);
	    VisualWorkspace ad = new VisualWorkspace();
	    frame.add(ad, BorderLayout.CENTER);
	    
		// important to call this whenever embedding a PApplet.
		// It ensures that the animation thread is started and
		// that other internal variables are properly set.
		
	}

	@Override
	public void setFocus() {
		// TODO Auto-generated method stub

	}

}
